package com.qkjia.day01;

public class Test03_MySynchronized {
    public static void main(String[] args) {
        // 对Synchronized Class对象进行加锁
        synchronized (Test03_MySynchronized.class) {
            System.out.println("atguigu");
        }
        // 静态同步方法，对Synchronized Class对象进行加锁
        m();
    }

    public static synchronized void m() {
        System.out.println("online");
    }
}